package com.ssww.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ssww.dao.BannerDao;
import com.ssww.entity.Banner;
import com.ssww.service.BannerService;
/**
 * 
 * @author 
 *
 */
@Service
public class BannerServiceImpl implements  BannerService {
	@Resource
	private BannerDao bannerDao;
	
	@Transactional
	public Banner getBannerById(Integer id) {
		return bannerDao.getBannerById(id);
	}
	@Transactional
	public List<Banner> getBannerList() {
		return bannerDao.getBannerList();
	}
	@Transactional
	public int addBanner(Banner a) {
		bannerDao.addBanner(a);
		return 0;
	}
	@Transactional
	public int deleteBanner(int id) {
		bannerDao.deleteBanner(id);
		return 0;
	}
	@Transactional
	public int updateBanner(Banner a, int id) {
		bannerDao.updateBanner(a, id);
		return 0;
	}


}
